import router from '@/router/index'
import { ElMessage } from 'element-plus'

export default function(){
    let handleError = (error:any) => {
        if(error.response.status === 401){
            ElMessage.warning("权限不够！")
        } else if(error.response.status === 500){
            ElMessage.error("结果出错！")
        }
    }
    let handleStatus = (status:number) => {
        // router.push({ path: "#/tNGS/description" })
        alert("出错了！！")
    }
    return { 
        handleError,
        handleStatus 
    } 
}